public class TestDemo {
    public static void main(String[] args) {
        int[][]array={{1,2,3},{4,5,6}};
        System.out.println("用foreach打印：");
        for(int[]tmp:array){
            for(int x:tmp){
                System.out.printf(x+" ");
            }
            System.out.println();
        }
    }

}
